package com.qfedu.openplateform.manager.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qfedu.openplateform.manager.dao.ApiSystemparamMapper;
import com.qfedu.openplateform.manager.entity.ApiSystemparam;
import com.qfedu.openplateform.manager.service.ApiSystemparamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class ApiSystemparamServiceImpl implements ApiSystemparamService {

    @Autowired
    private ApiSystemparamMapper apiSystemparamMapper;


    @Override
    public PageInfo<ApiSystemparam> findAllApiSystemparam(ApiSystemparam apiSystemparam, Integer page, Integer pageSize) {
        PageHelper.startPage(page, pageSize);
        return new PageInfo(apiSystemparamMapper.findAllApiSystemparam(apiSystemparam));
    }

    @Override
    public void addApiSystemparam(ApiSystemparam apiSystemparam) {
        apiSystemparamMapper.addApiSystemparam(apiSystemparam);
    }

    @Override
    public void updateApiSystemparam(ApiSystemparam apiSystemparam) {
        apiSystemparamMapper.updateApiSystemparam(apiSystemparam);
    }

    @Override
    public void deleteApiSystemparam(int[] ids) {
        for (int id : ids) {
            apiSystemparamMapper.deleteApiSystemparam(id);
        }
    }


}
